package com.stx.day0916;

import java.util.Scanner;

/**
 * packageName com.stx.day0916
 *
 * @author YangYi
 * @className HeroGameDemo
 * @date 2025/9/16
 * @description TODO
 */
public class HeroGameDemo {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        HeroGame palyer = new HeroGame();
        System.out.println("选择你的英雄");
        palyer.name = scanner.nextLine();
        System.out.println(palyer.name + "选择成功");
        double blue = 10;
        boolean flag = true;
        while (flag) {
            System.out.println("输入1:攻击");
            System.out.println("输入2:加蓝");
            System.out.println("输入3:退出游戏");
            int choose = scanner.nextInt();
            switch (choose) {
                case 1:
                    palyer.attack();
                    break;
                case 2:
                    blue = palyer.addblue(10);
                    break;
                case 3:
                    System.out.println("游戏退出");
                    flag = false;
                    break;
                default:
                    System.out.println("请求重连");
                    break;
            }
        }
    }
}
